/* 市场概况标题和日期 */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.section-header h2 {
  margin: 0;
}

.market-date {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
  background: rgba(0, 0, 0, 0.2);
  padding: 4px 10px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* 标签页样式 */
.right-panel .market-tabs {
  display: flex;
  height: 340px;
  margin-bottom: 10px;
  padding-bottom: 10px;
}

.right-panel .tab-header {
  display: flex;
  flex-direction: column;
  width: 20%;
  min-width: 100px;
  max-width: 120px;
  border-right: 1px solid #333;
  padding-right: 10px;
}

.tab-btn {
  padding: 8px 10px;
  background: #495057;
  border: none;
  cursor: pointer;
  font-size: 13px;
  color: white;
  text-align: center;
  position: relative;
  margin-bottom: 5px;
  border-radius: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: background-color 0.3s;
}

.tab-btn:hover {
  background-color: #343a40;
}

.tab-btn.active {
  color: white;
  font-weight: bold;
  background-color: #0d6efd;
}

.tab-btn.active:hover {
  background-color: #0b5ed7;
}

.tab-btn.active::after {
  display: none;
}

/* 移除标签按钮和图表区域之间的白色线条 */
.market-tabs {
  border: none;
}

.tab-header {
  border: none;
  box-shadow: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.tab-content {
  border: none;
  padding-top: 0;
  margin-top: 0;
}

.right-panel .market-tabs {
  border: none;
}

.tab-btn {
  margin: 8px 0;
}

/* 涨跌幅分布和指示器布局 */
.market-distribution-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  gap: 10px;
}

.echart-bar-container {
  flex: 8;
  height: 80%;
  min-height: 300px;
}

.market-status-indicator-container {
  flex: 1;
  height: 10%;
  min-height: 40px;
  margin-top: 10px;
}

/* 市场状态指示器样式 */
.market-status-container {
  width: 100%;
  margin: 10px 0;
}

.market-status-lines {
  display: flex;
  height: 4px;
  background-color: #333;
  border-radius: 2px;
  overflow: hidden;
}

.market-status-line {
  height: 100%;
  position: relative;
}

.market-status-line.up {
  background-color: #ff4d4f;
  clip-path: polygon(0 0, 100% 0, calc(100% - 4px) 100%, 0 100%);
}

.market-status-line.neutral {
  background-color: #faad14;
  clip-path: polygon(4px 0, 100% 0, calc(100% - 4px) 100%, 0 100%);
}

.market-status-line.down {
  background-color: #52c41a;
  clip-path: polygon(4px 0, 100% 0, 100% 100%, 0 100%);
}

.market-status-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 5px;
  font-size: 12px;
}

.up-label {
  color: #ff4d4f;
}

.down-label {
  color: #52c41a;
}

/* 涨跌幅柱状图横向线条 */
.chart-lines {
  display: flex;
  width: 100%;
  height: 10px;
  margin-top: 10px;
  background: transparent;
}

.chart-line-up {
  height: 100%;
  background: #ff4d4f; /* 红色 */
}

.chart-line-neutral {
  height: 100%;
  background: #8c8c8c; /* 灰色 */
}

.chart-line-down {
  height: 100%;
  background: #52c41a; /* 绿色 */
}

/* 市场状态指示器 */
.market-status-container {
  margin-top: 20px;
}

.market-status-lines {
  display: flex;
  width: 100%;
  height: 12px;
  gap: 4px;
}

.market-status-line {
  height: 100%;
  border-radius: 2px;
}

.market-status-line.up {
  background: #ff4d4f;
}

.market-status-line.neutral {
  background: #8c8c8c;
}

.market-status-line.down {
  background: #52c41a;
}

.market-status-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 12px;
}

.up-label {
  color: #ff4d4f;
}

.down-label {
  color: #52c41a;
}

.tab-content {
  flex: 1;
  padding-left: 15px;
  transition: all 0.3s ease;
}

.tab-pane {
  height: 100%;
  width: 100%;
}

/* 市场概况布局 */
.market-layout {
  display: flex;
  gap: 20px;
  margin-top: 15px;
}

.left-panel {
  flex: 2;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.right-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

/* 指数按钮区域 */
.index-buttons {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 5px;
}

.index-btn {
  min-width: 140px;
  flex: 1;
  padding: 12px;
  border-radius: 6px;
  background: rgba(30, 35, 45, 0.7); /* 深色背景 */
  border: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  transition: all 0.3s ease;
  cursor: pointer;
}

.index-btn:hover {
  background: rgba(40, 45, 55, 0.8);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.index-btn.active {
  background: rgba(0, 90, 180, 0.8); /* 深蓝色选中状态 */
  border-color: rgba(0, 120, 215, 0.5);
  box-shadow: 0 0 0 2px rgba(0, 120, 215, 0.5), 
              inset 0 0 10px rgba(0, 90, 180, 0.5);
}

.index-name {
  font-weight: bold;
  font-size: 16px;
  margin-bottom: 8px;
  color: white;
}

.index-price {
  font-size: 20px;
  font-weight: bold;
  margin-bottom: 5px;
}

.index-change-row {
  display: flex;
  justify-content: center;
  gap: 10px;
  font-size: 14px;
}

.index-buttons .up {
  color: #e74a3b !important; /* 上涨红色 */
}

.index-buttons .down {
  color: #1cc88a !important; /* 下跌绿色 */
}

.index-btn.active .up {
  color: #e74a3b !important; /* 保持红色 */
}

.index-btn.active .down {
  color: #1cc88a !important; /* 保持绿色 */
}

/* 图表容器 */
.chart-container {
  padding: 0;
  background: transparent;
  border-radius: 0;
  box-shadow: none;
  width: 100%;
}

/* 主图表区域 */
.main-chart {
  height: 350px;
}

/* 调整市场布局 */
.market-layout {
  display: flex;
  gap: 20px;
  margin-top: 15px;
}

.left-panel {
  flex: 1;
  max-width: 50%;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.right-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

/* 小图表区域 */
.mini-chart {
  height: 180px;
}

/* 图表标签样式 */
.chart-tabs {
  display: flex;
  margin-bottom: 10px;
}

.chart-tab {
  padding: 8px 15px;
  margin-right: 5px;
  background: #f5f5f5;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.chart-tab.active {
  background: #1890ff;
  color: white;
}

/* 主题卡片样式 - 科技效果 */
.themes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 15px;
  margin-top: 15px;
}

.theme-card {
  position: relative;
  overflow: hidden;
  padding: 15px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1), 
              0 0 0 1px rgba(255, 255, 255, 0.1) inset,
              0 0 10px rgba(0, 150, 255, 0.1);
  transition: all 0.3s ease;
}

.theme-card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    to bottom right,
    rgba(0, 150, 255, 0.1),
    rgba(0, 150, 255, 0),
    rgba(0, 150, 255, 0.1)
  );
  transform: rotate(30deg);
  z-index: -1;
}

.theme-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2), 
              0 0 0 1px rgba(255, 255, 255, 0.2) inset,
              0 0 15px rgba(0, 150, 255, 0.2);
}

.theme-card.hot {
  background: rgba(255, 77, 79, 0.08);
  border: 1px solid rgba(255, 77, 79, 0.3);
  box-shadow: 0 4px 20px rgba(255, 77, 79, 0.1), 
              0 0 0 1px rgba(255, 255, 255, 0.1) inset,
              0 0 10px rgba(255, 77, 79, 0.2);
}

.theme-card h4 {
  color: #1890ff;
  margin-bottom: 10px;
  font-size: 1.1em;
}

.theme-card p {
  margin: 5px 0;
  color: rgba(255, 255, 255, 0.8);
}

.theme-card .hot {
  color: #ff4d4f;
}

/* 交易策略卡片 - 科技效果 */
.strategy-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 15px;
  margin-top: 15px;
}

.strategy-card {
  position: relative;
  overflow: hidden;
  padding: 20px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1), 
              0 0 0 1px rgba(255, 255, 255, 0.1) inset,
              0 0 10px rgba(0, 150, 255, 0.1);
  transition: all 0.3s ease;
}

.strategy-card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    to bottom right,
    rgba(0, 150, 255, 0.1),
    rgba(0, 150, 255, 0),
    rgba(0, 150, 255, 0.1)
  );
  transform: rotate(30deg);
  z-index: -1;
}

.strategy-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2), 
              0 0 0 1px rgba(255, 255, 255, 0.2) inset,
              0 0 15px rgba(0, 150, 255, 0.2);
}

.strategy-card h4 {
  color: #1890ff;
  margin-bottom: 10px;
  font-size: 1.1em;
}

.strategy-card p {
  margin: 5px 0;
  color: rgba(255, 255, 255, 0.8);
}

.strategy-detail {
  margin-top: 10px;
  padding: 6px 12px;
  background: rgba(24, 144, 255, 0.2);
  color: #1890ff;
  border: 1px solid rgba(24, 144, 255, 0.3);
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.strategy-detail:hover {
  background: rgba(24, 144, 255, 0.3);
}

/* 涨跌分布样式 */
.market-distribution {
  height: auto;
  min-height: 220px;
}

.distribution-container {
  display: flex;
  justify-content: space-between;
  gap: 15px;
}

.distribution-left, .distribution-right {
  flex: 1;
  min-width: 0;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.distribution-left h4, .distribution-right h4 {
  margin-top: 0;
  margin-bottom: 10px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.8);
  text-align: center;
}

.tab-btn {
  min-width: 120px;
  padding: 8px 16px;
  height: 40px;
  line-height: 24px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tab-btn.active {
  background-color: #333;
  font-weight: bold;
}